package cn.wendellup.bootStrap.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.wendellup.bootStrap.dao.contract.IAdvDao;
import cn.wendellup.bootStrap.service.contract.IAdvService;
import cn.wendellup.bootStrap.valueobject.entity.AdvDetail;
import cn.wendellup.bootStrap.valueobject.entity.AdvPosition;
import cn.wendellup.bootStrap.valueobject.entity.AdvPositionLink;

@Service
public class AdvServiceImpl implements IAdvService{
	@Autowired
	private IAdvDao advDao;

	@Override
	public List<Integer> listAdvDetailIdsByAdvPostionId(Integer advPositionId) {
		return advDao.listAdvDetailIdsByAdvPostionId(advPositionId);
	}

	@Override
	public List<Integer> listAdvPositionIdByAppId(Integer appParameterId) {
		return advDao.listAdvPositionIdByAppId(appParameterId);
	}

	@Override
	public AdvDetail getAdvDetailById(Integer id) {
		return advDao.getAdvDetailById(id);
	}

	@Override
	public AdvPositionLink getAdvPositionLinkByPositionAndAppId(
			Integer positionId, Integer appId) {
		return advDao.getAdvPositionLinkByPositionAndAppId(positionId, appId);
	}

	@Override
	public AdvPosition getAdvPositionById(Integer id) {
		return advDao.getAdvPositionById(id);
	}

}
